/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package entity.structure;

/**
 *
 * @author dell
 */
import entity.support.Area;
import entity.support.LogIndexable;
import entity.support.Obj;
import java.util.List;
import java.util.LinkedList;
import java.util.Map;
public class Building extends Obj implements LogIndexable
{
//columns_______________________________________________________________________
private double height;
private int square;
private Area area;
private int usetype;
private int structuretype;
private int fireproof;
private String maincompanyid;
private String cubicdiagramurl;
private String planediagramurl;
private String companyid;
private String remark;
//functions_____________________________________________________________________
     //constructor______________________________________________________________
public Building()
{
     
}    
public Building(Obj o)
{
     this.id=o.getId();
     this.name=o.getName();
     this.intime=o.getIntime();
     this.updatetime=o.getUpdatetime();
}
public Building(Map<String,String> map)
{
     
}
     //getter___________________________________________________________________
public double getHeight() 
{
     return height;
}
public int getSquare() 
{
     return square;
}
public int getUsetype() 
{
     return usetype;
}
public Area getArea()
{
     return area;
}
public int getStructuretype() 
{
     return structuretype;
}
public int getFireproof() 
{
     return fireproof;
}
public String getMaincompanyid() 
{
     return maincompanyid;
}
public String getCubicdiagramurl() 
{
     return cubicdiagramurl;
}
public String getPlanediagramurl() 
{
     return planediagramurl;
}
public String getCompanyid() 
{
     return companyid;
}
public String getRemark() 
{
     return remark;
}
     //setter___________________________________________________________________
public void setHeight(double height) 
{
     this.height = height;
}
public void setSquare(int square) 
{
     this.square = square;
}
public void setArea(Area area)
{
     this.area=area;
}
public void setUsetype(int usetype) 
{
     this.usetype = usetype;
}
public void setStructuretype(int structuretype) 
{
     this.structuretype = structuretype;
}
public void setFireproof(int fireproof) 
{
     this.fireproof = fireproof;
}
public void setMaincompanyid(String maincompanyid) 
{
     this.maincompanyid = maincompanyid;
}
public void setCubicdiagramurl(String cubicdiagramurl) 
{
     this.cubicdiagramurl = cubicdiagramurl;
}
public void setPlanediagramurl(String planediagramurl) 
{
     this.planediagramurl = planediagramurl;
}
public void setCompanyid(String companyid) 
{
     this.companyid = companyid;
}
public void setRemark(String remark) 
{
     this.remark = remark;
}
     //operator_________________________________________________________________
public void setDetail(Building b)
{
     if(b.cubicdiagramurl!=null) this.cubicdiagramurl=b.cubicdiagramurl;
     if(b.planediagramurl!=null) this.planediagramurl=b.planediagramurl;
     if(b.remark!=null) this.remark=b.remark;
}
public List<String> getCompanyidInList()
{
     return StructureUtil.toList(this.companyid);
}
     //toString_________________________________________________________________
@Override
public String toString()
{
     return super.toString()+"\t"+height+"\t"+area+"\t"+square+"\t"+usetype+"\t"+structuretype+"\t"
             +fireproof+"\t"+maincompanyid+"\t"+cubicdiagramurl+"\t"+planediagramurl+"\t"
             +companyid+"\t"+remark;
            
}
}
